home *** CD-ROM | disk | FTP | other *** search
/ Wildcat Files 2 / The Wildcat Files 2 (Arsenal Computer).ISO / desq / except13.tec < prev    next >
Text File  |  1994-04-02  |  4KB  |  68 lines

  1. Quarterdeck Technical Note
  2. by Bob Perry
  3.  
  4.                          EXCEPTION #13
  5.  
  6. What is "Exception 13?"                              
  7. What can be done to prevent "Exception 13's?"
  8.  
  9.     Exceptions are unusual or invalid conditions associated 
  10. with the execution of a particular instruction by the 80386 
  11. processor.  The 80386 recognizes several different classes of 
  12. exceptions, and assigns a different vector number to each class.
  13. The DESQview-386 memory manager, QEMM-386, has been designed to
  14. capture these 80386 exception vectors and display them directly
  15. to the user.
  16.     Exception 13 is the "General Protection Fault" error. Any
  17. privileged instruction or any instruction that references memory
  18. can trigger an Exception 13. 
  19.     In the first case, privileged instructions, the Exception
  20. 13 could indicate that a program has violated the protected mode of
  21. the 80386 by executing a privileged instruction or I/O reference.
  22. Thus, when the prompt, "Terminate, Reboot or Continue?" is issued, 
  23. the "Continue" option directs the 80386 to reorder the ranking of
  24. priviliged instructions and the program should continue to execute.
  25.     It is the second case, instructions that reference memory, 
  26. that are far more common to DESQview 386 (and QEMM-386) users.  
  27. Here the exception can indicate that an application has a bug.  
  28. It has over-written its memory partition, and may in fact be 
  29. running wild, writing code all over the place.  This situation 
  30. can occur with some programs that were written for use on the 
  31. 8088 processor and may not be useable in the 80386's virtual 8086 
  32. mode. A few other programs may not be compatible with QEMM-386. 
  33. All this adds up to mean that when "Terminate, Reboot or 
  34. Continue" is displayed, the user can only "Terminate."
  35.     For those users who are more technically oriented, this
  36. over-writing of the memory partition generally means that a word
  37. or a double word value of code has been written to the last byte 
  38. of a segment.  The problem or "bug" in the application program 
  39. has to do with wrapping the value to the next segment of memory.
  40.     What can the user do to prevent Exception 13's?   The 
  41. DESQview 386 user can try two things:  First, run Change Program 
  42. and try to allocate more memory to the application.  Second, the 
  43. user can try to increase the Protection Level to 3, which will 
  44. not alleviate the source of the Exception 13, but may allow the 
  45. application to pass more descriptive error messages through to 
  46. the user.  
  47.     When Exception 13's are obtained outside of DESQview they
  48. are either caused by applications written for the 80386 protected 
  49. mode or they are not.  If the faulting application is written for 
  50. protected mode of the 80386, it is likely that this program has
  51. no VCPI (Virtual Control Program Interface).  Since QEMM-386 is a
  52. virtual 8086 program, such faulting applications cannot be run
  53. under QEMM without VCPI.  The user has no choice but to reboot 
  54. without QEMM, and contact the developer of the faulting application
  55. for VCPI support.
  56.     If the faulting application was not written for the 
  57. protected mode of the '386, the QEMM user is probably using the
  58. RAM parameter (which is necessary to LOADHI drivers and TSR's).
  59. In this case the faulting program may be writing to areas of high
  60. RAM which are already mapped by other code.  To correct this 
  61. problem, the user may opt to RAM only specific areas of memory, 
  62. as described on page 6 of the QEMM manual, rather than issue a 
  63. RAM for all mappable areas.  Another possible solution to such 
  64. memory conflicts might be to use the EXCLUDE parameter (on page 5
  65. of the QEMM manual) for all known ROM's being mapped into RAM.
  66.  
  67.              * * *   E N D   O F   F I L E    * * * 
  68.